<template>
  <a-radio-group :options="options" v-model:value="val" @change="change" />
</template>

<script>
import { ref } from '@vue/reactivity';

export default {
    props:{
        options:{//选项
            type:Array,
            required:true
        },
        currentVal:{//当前选中值
            type:String,
            required:true
        }
    },
    setup(props,{emit}){
        const val = ref(props)

        const change = (e)=>{
            emit("update:currentVal",e.target.value)
        }
        return{
            // options,
            val,
            change
        }
    }
}
</script>

<style>

</style>